#pragma once

#include "SDLComponent.h"

class SDLSprite : public SDLComponent
{
public:
	SDLSprite();
	SDLSprite( std::string filePath, int x, int y, SDL_Surface* destination );
	~SDLSprite();

	SDL_Surface* LoadImage( std::string filepath );
	void ApplyImage( int x, int y, SDL_Surface* source, SDL_Surface* destination );

	virtual void Update();
	virtual void Draw();
	void Reset();
	void SetPosition(int x, int y);
	int GetX() { return x; }
	int GetY() { return y; }

protected:
	void SetSprite( std::string filePath, int x, int y, SDL_Surface* destination );
	
private:
	int x, y;
	SDL_Surface* surface;
	SDL_Surface* destination;
};

